pull: the commit size in the summary is not for the detached metadata
authorGiuseppe Scrivano <gscrivan@redhat.com>
Tue, 28 Apr 2015 09:56:53 +0000 (11:56 +0200)
committerGiuseppe Scrivano <gscrivan@redhat.com>
Sun, 3 May 2015 19:44:09 +0000 (21:44 +0200)
Use the size specified in the summary file only for the not detached
metadata.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
src/libostree/ostree-repo-pull.c

index 503baa31d1a5e78f5e9964ab8e901d52c366eae5..69f7123eb00eb751f70d98ea503294d36cce3846 100644 (file)
@@ -1228,7 +1228,7 @@ enqueue_one_object_request (OtPullData        *pull_data,
   fetch_data->is_detached_meta = is_detached_meta;
   fetch_data->object_is_stored = object_is_stored;
 
-  expected_max_size_p = g_hash_table_lookup (pull_data->expected_commit_sizes, checksum);
+  expected_max_size_p = is_detached_meta ? NULL : g_hash_table_lookup (pull_data->expected_commit_sizes, checksum);
   if (expected_max_size_p)
     expected_max_size = *expected_max_size_p;
   else if (is_meta)